package com.cjb.cloudsystem.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjb.cloudsystem.entity.SysParams;
import com.cjb.cloudsystem.vo.SysCaptchaVO;
import com.cjb.cloudsystem.vo.SysParamsVO;

import java.util.List;

/**
 * 参数管理
 *
 * @author 陈锦斌 2213859123@qq.com
 * @since 1.0.0 2023-08-24
 */
public interface SysParamsService extends com.baomidou.mybatisplus.extension.service.IService<SysParams> {


    /**
     * 单体保存
     *
     * @return
     * @Author chenjinbin
     * @Value
     * @Title
     */
    boolean save(SysParams sysParams);

    /**
     * 批量保存
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    Integer listSave(List<SysParams> sysParams);

    /**
     * 批量更新
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    void listUpdate(List<SysParams> sysParams);

    /**
     * 批量删除
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    void listDelete(List<SysParams> sysParams);

    /**
     * 通过id删除
     *
     * @return
     * @Author chenjinbin
     * @Value
     * @Title
     */
    int deleteById(SysParams sysParams);

    /**
     * 单个查询
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    SysParams queryById(Long id);

    /**
     * 分页查询
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    Page queryPage(Page sysParamsPage, SysParamsVO sysParams);
    /**
     * 条件查询
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    List<SysParams> queryBySysParams(SysParamsVO sysParams);
    /**
     * 返回全部信息
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    List<SysParams> returnAllData();

    /**
     * 判断验证码是否开启 true 开启 false 关闭
     *
     * @Author chenjinbin
     * @Value
     * @Title
     */
    boolean isCaptchaEnabled();

    /**
     * 生成验证码 generate
     *
     * @param
     * @return
     * @author chenjinbin
     * @email 2213859123@qq.com
     * @date 2023-07-12 9:10
     */
    SysCaptchaVO generate();

    /**
     * 验证码校验
     *
     * @param
     * @return
     * @author chenjinbin
     * @email 2213859123@qq.com
     * @date 2023-07-12 9:10
     */
    boolean validateCaptcha(String key, String code);
}
